<template>
    <div>
      <!-- 面包屑 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>活动管理</el-breadcrumb-item>
      <el-breadcrumb-item>活动列表</el-breadcrumb-item>
      <el-breadcrumb-item>活动详情</el-breadcrumb-item>
    </el-breadcrumb>
     <!-- 卡片 -->
     <el-card style="margin-top:30px">
          <el-table border :data="rightlist">
                <el-table-column type="index" label="#"></el-table-column>
                <el-table-column prop="authName" label="权限名称"></el-table-column>
                <el-table-column prop="path" label="路径"></el-table-column>
                <el-table-column prop="level" label="权限名称">
                    <template slot-scope="scope">
                       <el-tag :type="typeArr[scope.row.level]">{{scope.row.level|rank}}</el-tag>
                    </template>
                </el-table-column>
          </el-table>
     </el-card>
    </div>
</template>

<script>
    export default {
        data() {
            return {
               rightlist:[],
               typeArr:{
                   0:"primary",
                   1:"success",
                   2:"warning",
               }
            }
        },
        created(){
           this.getrightlist()
        },
        methods:{
            // 权限列表
           async getrightlist () {
               const res = await this.$API.rightAPI()
               console.log("权限列表：",res);
               this.rightlist=res
           },
           
        }
    }
</script>

<style lang="scss" scoped>

</style>